Move evtchn_vector from vcpu_info to shared_info.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
.name = "xen-event-channel"
};
-int evtchn_irq = 0xe9;
+static int evtchn_irq = 0xe9;
void __init evtchn_init(void)
{
shared_info_t *s = HYPERVISOR_shared_info;
- vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()];
-#if 0
- int ret;
- irq = assign_irq_vector(AUTO_ASSIGN);
- ret = request_irq(irq, evtchn_interrupt, 0, "xen-event-channel", NULL);
- if (ret < 0)
- {
- printk("xen-event-channel unable to get irq %d (%d)\n", irq, ret);
- return;
- }
-#endif
register_percpu_irq(evtchn_irq, &evtchn_irqaction);
- vcpu_info->arch.evtchn_vector = evtchn_irq;
+ s->arch.evtchn_vector = evtchn_irq;
printk("xen-event-channel using irq %d\n", evtchn_irq);
spin_lock_init(&irq_mapping_update_lock);
XEN_RESTORE_PSR_IC
;;
br.ret.sptk.many rp
-END(xen_set_rr)
+END(xen_set_kr)
GLOBAL_ENTRY(xen_fc)
movl r8=running_on_xen;;
ctxt->flags = VGCF_VMX_GUEST;
ctxt->regs.cr_iip = 0x80000000ffffffb0UL;
- ctxt->vcpu.privregs = 0;
+ ctxt->privregs = 0;
memset( &launch_op, 0, sizeof(launch_op) );
ctxt->regs.ar_fpsr = xc_ia64_fpsr_default();
/* currently done by hypervisor, should move here */
/* ctxt->regs.r28 = dom_fw_setup(); */
- ctxt->vcpu.privregs = 0;
+ ctxt->privregs = 0;
ctxt->sys_pgnr = 3;
i = 0; /* silence unused variable warning */
#else /* x86 */
void arch_getdomaininfo_ctxt(struct vcpu *v, struct vcpu_guest_context *c)
{
- struct pt_regs *regs = vcpu_regs (v);
-
- c->regs = *regs;
- c->vcpu.evtchn_vector = v->vcpu_info->arch.evtchn_vector;
-
+ c->regs = *vcpu_regs (v);
c->shared = v->domain->shared_info->arch;
}
}
new_thread(v, regs->cr_iip, 0, 0);
- v->vcpu_info->arch.evtchn_vector = c->vcpu.evtchn_vector;
- if ( c->vcpu.privregs && copy_from_user(v->arch.privregs,
- c->vcpu.privregs, sizeof(mapped_regs_t))) {
+ if ( c->privregs && copy_from_user(v->arch.privregs,
+ c->privregs, sizeof(mapped_regs_t))) {
printk("Bad ctxt address in arch_set_info_guest: %p\n",
- c->vcpu.privregs);
+ c->privregs);
return -EFAULT;
}
c.regs.cr_iip = targ_regs->cr_iip;
c.regs.r1 = targ_regs->r1;
- /* Copy from vcpu 0. */
- c.vcpu.evtchn_vector =
- current->domain->vcpu[0]->vcpu_info->arch.evtchn_vector;
if (arch_set_info_guest (targ, &c) != 0) {
printf ("arch_boot_vcpu: failure\n");
return;
*/
check_start:
if (event_pending(vcpu) &&
- !test_bit(vcpu->vcpu_info->arch.evtchn_vector,
+ !test_bit(vcpu->domain->shared_info->arch.evtchn_vector,
&PSCBX(vcpu, insvc[0])))
- vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector);
+ vcpu_pend_interrupt(vcpu, vcpu->domain->shared_info->arch.evtchn_vector);
p = &PSCBX(vcpu,irr[3]);
r = &PSCBX(vcpu,insvc[3]);
smp_send_event_check_cpu(v->processor);
if(!VMX_DOMAIN(v))
- vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector);
+ vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector);
}
/* Note: Bitwise operations result in fast code with no branches. */
} mapped_regs_t;
typedef struct {
- mapped_regs_t *privregs;
- int evtchn_vector;
} arch_vcpu_info_t;
typedef mapped_regs_t vpd_t;
typedef struct {
unsigned int flags;
unsigned long start_info_pfn;
+
+ /* Interrupt vector for event channel. */
+ int evtchn_vector;
} arch_shared_info_t;
typedef struct {
unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */
cpu_user_regs_t regs;
- arch_vcpu_info_t vcpu;
+ mapped_regs_t *privregs;
arch_shared_info_t shared;
arch_initrd_info_t initrd;
char cmdline[IA64_COMMAND_LINE_SIZE];